<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
    <meta name="renderer" content="webkit">
    <title>教务管理系统</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/pintuer.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/admin.css">

    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>


</head>
<body style="background-color:#f2f9fd;">
<div class="header bg-main">
    <div class="logo margin-big-left fadein-top">
        <h1><img src="${pageContext.request.contextPath}/images/y.jpg" class="radius-circle rotate-hover" height="50"
                 alt=""/>教务管理系统</h1>
    </div>
    <div class="head-l">
        <shiro:hasRole name="教务主任">
            <a href="${pageContext.request.contextPath}/user/home" class="button button-little bg-green" target="right">
                系统首页</a> &nbsp;&nbsp;
        </shiro:hasRole>

        <shiro:hasAnyRoles name="班主任,任课教师">
            <a href="${pageContext.request.contextPath}/student/studentList" class="button button-little bg-green"
               target="right"> 系统首页</a> &nbsp;&nbsp;
        </shiro:hasAnyRoles>
        <a href="javascript:void(0)" class="button button-little bg-blue" onclick="pwdWin()"> 修改密码</a> &nbsp;&nbsp;
        <a href="${pageContext.request.contextPath}/exit" class="button button-little bg-red"> 退出登录</a></div>
</div>
<div class="leftnav">
    <div class="leftnav-title"><strong>菜单列表</strong></div>
    <h2>信息管理</h2>
    <ul style="display:block">

        <shiro:hasAnyRoles name="教务主任,班主任">
            <li><a href="${pageContext.request.contextPath}/classes/classList" target="right">班级信息管理</a></li>
        </shiro:hasAnyRoles>
        <shiro:hasAnyRoles name="教务主任,班主任,任课教师">
            <li><a href="${pageContext.request.contextPath}/student/studentList" target="right">学生信息</a></li>
        </shiro:hasAnyRoles>
        <%--        </shiro:hasRole>--%>

        <%--            <shiro:hasRole name="班主任">--%>

        <%--            </shiro:hasRole>--%>
        <%--    没有ttt角色所阚道德--%>
        <%--        <shiro:lacksRole name="ttt">--%>
        <%--            用户：<shiro:principal></shiro:principal>--%>
        <%--        </shiro:lacksRole>--%>


        <%--&lt;%&ndash;    拥有student，vip的用户&ndash;%&gt;--%>
        <%--        <shiro:hasAnyRoles name="student,vip">--%>
        <%--            <li><a href="${pageContext.request.contextPath}/emp/empArchive" target="right">员工档案管理</a></li>--%>
        <%--        </shiro:hasAnyRoles>--%>
        <%--&lt;%&ndash;    拥有dd角色的用户&ndash;%&gt;--%>
        <%--        <shiro:hasRole name="dd">--%>
        <%--            <li><a href="${pageContext.request.contextPath}/emp/empContract" target="right">员工合同管理</a></li>--%>
        <%--        </shiro:hasRole>--%>
    </ul>
    <h2>教务管理</h2>
    <ul style="display:block">
        <shiro:hasRole name="教务主任">
            <li><a href="${pageContext.request.contextPath}/department/departmentPage" target="right">院系管理</a></li>
        </shiro:hasRole>
        <shiro:hasAnyRoles name="教务主任,班主任">
            <li><a href="${pageContext.request.contextPath}/room/roomList" target="right">教室管理</a></li>
        </shiro:hasAnyRoles>
        <shiro:hasAnyRoles name="教务主任,班主任,任课教师">
            <li><a href="${pageContext.request.contextPath}/cource/courcePage" target="right">课程管理</a></li>
        </shiro:hasAnyRoles>
    </ul>

    <h2>教学管理</h2>
    <ul style="display:block">
        <shiro:hasAnyRoles name="教务主任,班主任">
            <li><a href="${pageContext.request.contextPath}/teach/arrange" target="right">教学计划</a></li>
        </shiro:hasAnyRoles>
        <shiro:hasAnyRoles name="教务主任,班主任,任课教师">
            <li><a href="${pageContext.request.contextPath}/teach/timeTable" target="right">课表查询</a></li>

            <li><a href="${pageContext.request.contextPath}/grade/gradePage" target="right">成绩管理</a></li>

            <li><a href="${pageContext.request.contextPath}/kaoqin/kaoqinPage" target="right">考勤管理</a></li>
        </shiro:hasAnyRoles>
        <shiro:hasRole name="教务主任">
            <li><a href="${pageContext.request.contextPath}/log/logPage" target="right">查看日志</a></li>
        </shiro:hasRole>
    </ul>
</div>
<script type="text/javascript">
    $(function () {
        $(".leftnav h2").click(function () {
            $(this).next().slideToggle(200);
            $(this).toggleClass("on");
        })
        $(".leftnav ul li a").click(function () {
            $("#a_leader_txt").text($(this).text());
            $(".leftnav ul li a").removeClass("on");
            $(this).addClass("on");
        })
    });


</script>

<ul class="bread">
    <shiro:hasRole name="教务主任">
        <li><a href="${pageContext.request.contextPath}/user/home" target="right"> 首页</a></li>
    </shiro:hasRole>

    <shiro:hasAnyRoles name="班主任,任课教师">
        <li><a href="${pageContext.request.contextPath}/student/studentList" target="right"> 首页</a></li>
    </shiro:hasAnyRoles>
    <li><a href="##" id="a_leader_txt">网站信息</a></li>
    <li><b>登录用户：</b><span style="color:red;"><shiro:principal></shiro:principal></span>

</ul>
<shiro:hasRole name="教务主任">
    <div class="admin">
        <iframe scrolling="auto" rameborder="0" src="${pageContext.request.contextPath}/user/home" name="right"
                width="100%" height="100%"></iframe>
    </div>
    <div style="text-align:center;">
    </div>
</shiro:hasRole>


<shiro:hasAnyRoles name="班主任,任课教师">
    <div class="admin">
        <iframe scrolling="auto" rameborder="0" src="${pageContext.request.contextPath}/student/studentList"
                name="right" width="100%" height="100%"></iframe>
    </div>
    <div style="text-align:center;">
    </div>
</shiro:hasAnyRoles>
</body>
</html>
